<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html class="iframe-h">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>角色管理</title>
    <link rel="stylesheet" type="text/css" href="../../static/admin/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/admin/css/admin.css"/>
</head>
<body class="iframe-h">
<div class="wrap-container email-wrap clearfix">
    <div class="row">
        <div class="col-lg-10">
            <div class="email-content">
                <div class="email-content-title layui-form">
                    <span class="write-title">角色管理</span>
                </div>
                <div class="email-tool-btn clearfix">
                    <div class="col-lg-6 email-tool-btn-left">
                        <button class="layui-btn layui-btn-small layui-btn-primary" id='email-refresh-btn' data-title='刷新'>
                            <i class="layui-icon">&#x1002;</i>
                        </button>
                    </div>
<%----%>
                </div>
                <div class="layui-form email-list">
                    <table class="layui-table" lay-even lay-skin="nob">
                        <colgroup>
                            <col width="50">
                            <col width="200">
                            <col>
                            <col class="hidden-xs" width="150">
                        </colgroup>
                        <thead>
                        <tr>
                            <th></th>
                            <th class="hidden-xs">编号</th>
                            <th class="hidden-xs">角色名称</th>
                            <th class="hidden-xs">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%--<tr>--%>
                            <%--<td></td>--%>
                            <%--<td class="hidden-xs">Role.roleId</td>--%>
                            <%--<td>Role.roleName</td>--%>
                            <%--<td class="hidden-xs">--%>
                                <%--<a href="#" class="sheding">--%>
                                    <%--<span class="glyphicon glyphicon-asterisk"></span> 设定</a>--%>
                                <%--<a href="#" class="xiugai">--%>
                                    <%--<span class="glyphicon glyphicon-edit"></span> 修改</a>--%>
                            <%--</td>--%>
                        <%--</tr>--%>
                        </tbody>
                    </table>
                    <%--<div id="email-page" style="text-align: center;"></div>--%>
                </div>
            </div>
        </div>
    </div>
</div>
<%--<script src="${pageContext.request.contextPath}/jquery.1.10.1.min.js" type="text/javascript"></script>--%>
<script src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
<script src="../../static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script>
    $(document).ready(function () {
        $.ajax({
            async:true,
            type:"GET",
            url:"${pageContext.request.contextPath}/role/roleList",
            dataType:"json",
            success:function (result) {
                var content="";
                $.each(result,function (index,Role) {
                    content +="<tr>\n" +
                        "                            <td></td>\n" +
                        "                            <td class=\"hidden-xs\">" + Role.roleId + "</td>\n" +
                        "                            <td class=\"hidden-xs\">" + Role.roleName + "</td>\n" +
                        "                            <td class=\"hidden-xs\">\n" +
                        "                                <a href=\"rolePower.jsp?roleId="+Role.roleId+"&roleName="+Role.roleName+"\" class=\"sheding\">\n" +
                        "                                    <i class=\"layui-icon\">&#xe614;</i> 设定</a>\n" +
                        "                            </td>\n" +
                        "                        </tr>"
                });
                $(".layui-table tbody").html(content);
            },
            error:function () {
                alert("异步请求失败!");
            }
        })
    })
</script>
</body>
</html>
